package com.ulife.order.api.response;

import com.ulife.common.gateway.utils.annotation.Description;

import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.Date;
import java.util.List;

/**
 * Created by Ulife- dang 2015/12/30.
 */
@Description("亿起发订单信息")
public class YqfOrderInfo implements Serializable {
    @Description("订单编号")
    public String orderNo;
    @Description("活动ID-cid")
    public String campaignId;
    @Description("反馈标签-wi")
    public String feedback;
    @Description("订单状态")
    public String orderStatus;
    @Description("支付方式")
    public String paymentType;
    @Description("支付状态")
    public String paymentStatus;
    @Description("订单日期")
    public String orderTime;
    @Description("运费")
    public double fare;
    @Description("商品列表")
    public List<YqfOrderItemInfo> products;

    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }
    public String getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getCampaignId() {
        return campaignId;
    }

    public void setCampaignId(String campaignId) {
        this.campaignId = campaignId;
    }

    public String getFeedback() {
        return feedback;
    }

    public void setFeedback(String feedback) {
        this.feedback = feedback;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getPaymentStatus() {
        return paymentStatus;
    }

    public void setPaymentStatus(String paymentStatus) {
        this.paymentStatus = paymentStatus;
    }

    public double getFare() {
        return formatFloat(fare);
    }

    public void setFare(double fare) {
        this.fare = fare;
    }

    public List<YqfOrderItemInfo> getProducts() {
        return products;
    }

    public void setProducts(List<YqfOrderItemInfo> products) {
        this.products = products;
    }
    private double formatFloat(double x){
        return   new Double(new DecimalFormat("###0.00").format(x));
    }
}